import React from 'react'

export default function EventBinding() {
    const handleClick1 = () => {
        console.log('click1')
    }
    const handleClick2 = (e) => {
        console.log('click2',e)
    }
    const handleClick3 = (msg,e) => {
        console.log('click3',msg,e)
    }
  return (
    <div>
      <h1>jsx 事件绑定</h1>
      <button onClick={handleClick1}>直接绑定</button>
      <button onClick={handleClick2}>传递事件的对象</button>
      <button onClick={(e) => handleClick3("你好",e)}>传递自定义的数据</button>
    </div>
  )
}
